<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>BIBLIO: /home/marco/workspace/biblio/src/bibserver.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">BIBLIO
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/marco/workspace/biblio/src/bibserver.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="bibserver_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef BIBSERVER_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BIBSERVER_H_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#define TMPDIR &quot;tmp&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define SOCKPATH &quot;./tmp/&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define LIST_INIT 5</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <span class="preprocessor">#define ERR_PARAM &quot;Errore, fornire due parametri di avvio per il server: \&quot;nome biblioteca\&quot; e \&quot;file dei records\&quot;.\n&quot;</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define ERR_INIT &quot;Errore in fase di inizializzazione, server in chiusura!\n&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define ERR_FILE &quot;Errore nell&#39;apertura del file / directory&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define ERR_RECORD &quot;Errore nell&#39;apertura dei record!&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define ERR_SOCK &quot;Errore in fase di apertura/connessione su socket&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define ERR_ACPT &quot;Errore nell&#39;accettazione di una nuoca connessione&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define ERR_CLS &quot;Errore in fase di chiusura del server channel&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define ERR_STR &quot;Nessun record salvato!&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define ERR_SAV &quot;Errore nel salvataggio dei record; scritti su disco %d records\n&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define ERR_THR &quot;Errore nella creazione di un nuovo thread worker. Server in uscita!&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define ERR_FCL &quot;Errore nella chiusura del file di log&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="keywordtype">int</span> <a class="code" href="bibserver_8c.html#a09f8b3afade17ca6082330f22a4e1aac">init</a>(<span class="keywordtype">char</span> *bib_name, <span class="keywordtype">char</span> *record_filename);
<a name="l00041"></a>00041 
<a name="l00048"></a>00048 <span class="keywordtype">int</span> <a class="code" href="bibserver_8c.html#a4d04cb98d237318ce61bc06c2689ab52" title="Funzione che realizza il ciclo di funzionamento del server; accettazione nuove connessioni dai client...">serve</a>(<span class="keywordtype">void</span>);
<a name="l00049"></a>00049 
<a name="l00055"></a>00055 <span class="keywordtype">int</span> <a class="code" href="bibserver_8c.html#a84e414317c5f9ca3e549c1c419f2acc4" title="Funzione di salvataggio dei record.">save</a>(<span class="keywordtype">char</span>* bib_name);
<a name="l00056"></a>00056 
<a name="l00061"></a>00061 <span class="keywordtype">int</span> <a class="code" href="bibserver_8c.html#a4fff03cf2cf1cf3eb796eea94106e343" title="Gestione dei segnali del server.">signal_handling</a>(<span class="keywordtype">void</span>);
<a name="l00062"></a>00062 
<a name="l00067"></a>00067 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="bibserver_8h.html#a39700da94d4f9ed72d839a039a412170">sigint_handler</a>(<span class="keywordtype">int</span> signum);
<a name="l00068"></a>00068 
<a name="l00073"></a>00073 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="bibserver_8h.html#a45659e3b4b13b6182b3488b65445d1b1">sigterm_handler</a>(<span class="keywordtype">int</span> signum);
<a name="l00074"></a>00074 
<a name="l00079"></a>00079 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="bibserver_8h.html#a62913e326020658f53898c82400b2d76">sigpipe_handler</a>(<span class="keywordtype">int</span> signum);
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 <span class="preprocessor">#endif </span><span class="comment">/* BIBSERVER_H_ */</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Jun 29 2012 10:36:44 for BIBLIO by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
